{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 实时GPGPU FFT海水模拟"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Cooley-Tukey快速傅立叶变换算法\n",
    "本节研究Cooley Tukey 快速傅里叶变换（FFT）算法。FFT是一种快速计算离散傅里叶变换（DFT）的算法。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 简介：DFT计算\n",
    "给定由N和样本组成的离散信号$f$：\n",
    "$$f = [f[0], f[1], f[2], ..., f[{N-1}]]$$\n",
    "其DFT是由N元组定义的：\n",
    "$$F = [F[0], F[1], F[2], ..., F[{N-1}]]$$\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "其中：\n",
    "$$\n",
    "\\mathbf{F}[k] = \\sum_{n=0}^{N-1} \\mathbf{f}[n] e^{- \\frac{2\\pi i k n}{N}}, \\quad n = 0, 1, \\ldots, N-1 \n",
    "$$\n",
    "> 本式中,$F[k]$表示频率为k的复数值, $f[n]$表示时域信号的n时刻的值, $N$表示信号的长度, $i$表示虚数单位, $k$表示频率, $n$表示时域信号的时刻。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "复述:关于离散傅里叶变换的一些基础点：\n",
    "公式本身后半部分:\n",
    "1. $f[n]$是时域信号f在n时刻的值\n",
    "2. e是自然对数的底\n",
    "3. $i$是虚数单位\n",
    "4. $k$是频率\n",
    "5. $n$是时域信号的离散时刻\n",
    "6. $N$是信号的长度（n的最大值）\n",
    "最终：\n",
    "7. $F[k]$是频率为k的复数值\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "FFT算法能够在$O(N \\log N)$时间内计算DFT。FFT算法的基本思想是将DFT分解为较小的DFT，然后递归地计算这些较小的DFT。这种分解的一种常见方法是Cooley-Tukey算法。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Four-point FFT 四点FFT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 关于自然对数的底e\n",
    "“自然对数”是以e为底的对数函数。\n",
    "e是一个无理数（无限不循环小数），它的值约为2.71828。\n",
    "\n",
    "### 理解e的角度\n",
    "不要把e看作一个约等于2.71828的数字（这就像把$\\pi$看作一个约等于3.14159的数字一样）。$\\pi$是圆周长和直径之比。e是一个增长率，被所有持续增长进程所共享。\n",
    "e适用于所有持续、指数性增长的系统（人口，放射性衰变等等）。\n",
    "e代表一个概念：所有的持续增长系统的增长都遵循一个改变了比例的*普遍增长率*（Scaled version of a common rate）\n",
    "\n",
    "#### 例子\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "### e的定义\n",
    "$$\n",
    "e = \\lim_{n \\to \\infty} (1 + \\frac{1}{n})^n\n",
    "$$\n",
    "\n",
    "### e的重要性质\n",
    "1."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "fft_env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
